<!--右侧内容开始-->
<div class="fadeIn">
                <br/>
                <ol class="breadcrumb">
                    <li class="active"><span class="glyphicon glyphicon-home" style="color:#23527c"></span>&nbsp;<mainpage></mainpage></li>
                    <li class="active">运维工作台 / 程序运行管理</li>
                </ol>
                
           
               <div class="clearfix">
                   <form method="post" id="form" action="program/out-excel">
                    <div class="left marR10 marT15">
                        <span class="search-name">程序查询</span>
                        <input type="text" class="form-control1"  
                        ng-model='searchData.prgName' 
                        ng-keyup='search($event)'
                        placeholder="请输入程序名称" name="prgName">
                    </div>
                    <div class="left marR10 marT15">
                        <span class="search-name">ip查询</span>
                        <input type="text" id="searchIp" 
                        ng-model='searchData.deployId'
                        ng-keyup='search($event)'
                         class="form-control1" placeholder="请输入ip" name="deployId">
                    </div>
                  </form>
                    
                    <button class="btn btn-sm btn-primary left marT15" id="search" ng-click='search()'><span class="glyphicon glyphicon-search"></span></button>
                    
                    <div class="right marT15" style="position:relative">
                        <button class="btn btn-sm btn-primary" ng-click='outExcel()'><img style="width:25px; height:20px;" src="img/excel.png">导出表格<span ng-style='loadStyle' class="outExcelLoad"><img  src="img/load.gif"></span>
                        </button>
                    </div>
            </div>
      
             <div class="row marT15">
                <div class="left center" style="margin: 0px 20px 0px 15px;">
                    <input class="btn-success btn btn-sm" type="button" value="启动" ng-click="changeStatus('1')">
                </div>
                <div class="left center" style="margin: 0px 20px 0px 0px;">
                    <input class="btn-danger btn btn-sm" type="button" value="停止" ng-click="changeStatus('4')">
                </div>
                <!-- <div class="left center" style="margin: 0px 20px 0px 0px;">
                    <input class="btn-warning btn btn-sm" type="button" value="暂停" data-toggle="modal" data-target="" ng-click="changeStstus('暂停')">
                </div> -->
                <div class="left center" style="margin: 0px 20px 0px 0px;">
                    <input class="btn-primary btn btn-sm" type="button" value="重载" ng-click="changeStatus('2')">
                </div>
            </div>
             <div class="table-box">  
                <table class="table table-bordered table-striped text-center bg-info marT15">
                    <thead >
                    <tr class="info">
                        <th class="text-center">                      
                          <input type="checkbox" style="vertical-align: text-bottom;" 
                          ng-model="all"
                          ng-click="select_all()">
                         全选                      
                        </th>
                        <th class="text-center">序号</th>
                        <th class="text-center">程序id</th>
                        <th class="text-center">程序名称</th>  
                        <th class="text-center">主程序名</th>
                        <th class="text-center">模块名</th>
                        <th class="text-center">状态</th>
                        <th class="text-center">运行时长</th>
                        <th class="text-center">部署主机(ip)</th>
                        <th class="text-center">程序说明</th>
                        <th class="text-center">程序管理</th>
                        <th class="text-center">记录操作</th>
                    </tr>
                    </thead>
                    <tbody id="appList">
                    <tr ng-repeat='item in result'>
                        <td class="w70">
                          <input type="checkbox" ng-model='item.checked'>
                        </td>
                        <td>{{$index+1}}</td>
                        <td class="w70"><a data-toggle="modal" name="modal" data-target="#add1" ng-click="editTr('修改',item.prgId)">{{item.prgId}}</a></td>
                        <td class="w115">{{item.prgName}}</td>
                        <td class="w115">{{item.groupName}}</td>
                        <td class="w70">{{item.moduleName}}</td>
                        <td>
                          <span ng-show='1==item.runningStatus' class="statusRound" style="background: green;"></span>
                          <span ng-show='3==item.runningStatus' class="statusRound" style="background: red;"></span>
                          <span ng-show='4==item.runningStatus' class="statusRound" style="background: orange"></span>
                        </td>
                        <td class="w115">{{item.runTime}}</td>
                        <td class="w115">{{item.deployId}}</td>
                        <td style="min-width:200px; word-break: break-all;">{{item.desc}}</td>
                        <td style="min-width:150px;">
                        <a href="javascript:;" style="" 
                        ng-click="startUp(item.prgId,$event,$index)"
                        
                        >启动</a>
                       <!--  <a href="javascript:;" class="btn btn-primary btn-sm" 
                        ng-click="pause(item.prgId,$event,$index)"
                        ng-class="{'bg-orange':3==item.runningStatus}"
                        >暂停</a> -->
                        <a href="javascript:;" class="marR10 marL10" 
                        ng-click="stopUp(item.prgId,$event,$index)"
                        style="color: red" 
                        >停止</a>
                        <a href="javascript:;" class="" 
                        ng-click="restart(item.prgId,item.runningStatus,$index)"
                        style="" 
                        >重载</a>
                        </td>
                        <td class="w115">
                            <a class="marR10" data-toggle="modal" name="modal" data-target="#add1" ng-click="editTr('修改',item.prgId)">修改</a>
                            <a class="" data-toggle="modal" data-target="#delete"  ng-click='delete(item.prgId,$index)'>删除</a></td>                       
                    </tr>
                    
                    </tbody>
                    <tfoot>
                      <tr>
                       <td><a class="glyphicon glyphicon-plus" data-toggle="modal" ng-click="editTr('添加')" data-target="#add1"></a></td>
                       <td></td>
                       <td></td>
                       <td></td>
                       <td></td>
                       <td></td>
                       <td></td>
                       <td></td>
                       <td></td>
                       <td></td>
                       <td></td>
                      </tr>
                   </tfoot>                
                </table>
      </div>


                <page></page>
                
</div>
<!-- 程序运行管理结束 -->
            
<!--添加程序弹窗-->
<div class="modal fade" id="add1" tabindex="-1" role="dialog" aria-labelledby="add11">
    <form name="form">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="add11">{{popup}}程序</h4>
            </div>
            <div class="modal-body">           
               <div class="row marB15"> 
                   <span class="col-xs-6">
                       <label class="left"><span>程序id ：</span></label>
                        <input type="text" onkeyup="value=value.replace(/[^\w\.\/]/ig,'')" ng-model="addData.prgId" class="right form-control line4" ng-disabled='isDisabled'>
                   </span>
                   <span class="col-xs-6">
                       <label class="left"><span>程序名 ：</span></label>
                        <input type="text" class="right form-control line4" ng-model="addData.prgName" />
                   </span>
               </div>
               <div class="row marB15"> 
                   <span class="col-xs-6">
                       <label class="left"><span>部署ip ：</span></label>
                        <input type="text" class="right form-control line4" id="editIp" 
                        ng-blur='checkEditIp()'
                        ng-model="addData.deployId" />
                   </span>
                   <span class="col-xs-6">
                       <label class="left"><span>部署目录 ：</span></label>
                        <input type="text" class="right form-control line4" ng-model='addData.deployDir' />
                   </span>
               </div>
               <div class="row marB15"> 
                   <span class="col-xs-6">
                       <label class="left"><span>主程序名 ：</span></label>
                        <input type="text" class="right form-control line4"  ng-model="addData.groupName"/>
                   </span>
                   <span class="col-xs-6">
                       <label class="left"><span>模块名 ：</span></label>
                        <input type="text" class="right form-control line4"  ng-model="addData.moduleName"/>
                   </span>
               </div>
               <div class="row">
                    <span class="col-xs-12">
                       <label class="left"><span>程序说明 ：</span></label>
                        <textarea class="left form-control" ng-model="addData.desc"></textarea>
                   </span>
               </div>
               <div class="row">
                   <table class="table table-bordered table-striped text-center bg-info marT15">
                  <thead >
                  <tr class="info">
                  <th class="text-center">序号</th>
                  <th class="text-center">参数名</th>
                  <th class="text-center">参数中文名称</th>
                  <th class="text-center">参数值</th>
                  <th class="text-center">操作</th>

                  </tr>
                  </thead>
                  <tbody id="appList">
                  <tr ng-repeat='item in addData.prgExtInfos'>
                  <td>{{$index+1}}</td>
                  <td><div style="position:relative"><input type="text" ng-model="item.paramName" class="form-control line3"></div></td>

                  <td><div style="position:relative"><input type="text"  ng-model="item.paramNameCn" class="form-control line3"></div></td>
                  <td><div  style="position:relative"><input type="text"  ng-model="item.paramValue" class="form-control line3"></div></td>
                  <td>
                      <a href="javascript:;" class="btn btn-primary btn-sm" ng-click='deleteConfig($index)'>删除</a>
                  </td>                       
                  </tr>
                  <tr>
                  <td><a href="javascript:;" class="glyphicon glyphicon-plus" ng-click='addConfig()'></a></td>
                  <td></td>
                  <td></td>
                  <td></td>
                  <td></td>
                  </tr>

                  </tbody>
                  </table>
                </div>         
                 
                       
              
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default btn-sm" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-primary btn-sm" ng-click='editSave()'>保存</button>
            </div>
        </div>
    </div>
    </form>
</div>
<!-- 添加程序结束 -->
    

<div class="modal fade" id="delete">  
  <div class="modal-dialog">  
    <div class="modal-content message_align">  
      <div class="modal-header">  
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>  
        <h4 class="modal-title">提示信息</h4>  
      </div>  
      <div class="modal-body">  
        <p>您确认要删除吗？</p>  
      </div>  
      <div class="modal-footer">  
         <input type="hidden" id="url"/>  
         <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>  
         <a id="deleteSure" class="btn btn-primary" data-dismiss="modal" ng-click="deleteTr()">确定</a>  
      </div>  
    </div><!-- /.modal-content -->  
  </div><!-- /.modal-dialog -->  
</div><!-- /.modal -->  

     
<!--右侧内容结束-->
<!-- 加载提示框 -->
<div id="statusTip" ng-style='statusLoad'>
    <div id="statusBox">
     <img src="img/load.gif" style="width:50px; height:50px; position: relative; left:55px; margin-bottom: 15px;"><p style="color: #fff;">正在{{loadStatus}}，请稍候....</p>
    </div>
</div>
<!-- 加载框 -->
  <span class='loaded' ng-show='loaded'><img  src="img/load.gif"></span>
<!-- 加载框 完成-->